package com.wgy.designmode.action.observer.observer;

import com.wgy.designmode.action.observer.subject.Subject;

public class Observer_2 extends Observer{

    public Observer_2(Subject subject) {
        super(subject);
        super.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println("subject state change :  " + super.subject.getState() + " ,observer_2 has received!");
    }
}
